代码拉取完成,页面将自动刷新
import resolve from '@rollup/plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import template from 'rollup-plugin-generate-html-template';
const extensions = [
'.ts'
];
export default [
// Geometry
buildExample('triangle-screen-shader'),
buildExample('draw-modes'),
buildExample('indexed-vs-non-indexed'),
buildExample('load-json'),
buildExample('wireframe'),
buildExample('base-primitives'),
buildExample('particles'),
buildExample('instancing'),
buildExample('polylines'),
buildExample('load-gltf'),
buildExample('curves'),
buildExample('torus'),
buildExample('compute-vertex-normal'),
// Scenes
buildExample('scene-graph'),
buildExample('sort-transparency'),
buildExample('frustum-culling'),
// Interaction
buildExample('orbit-controls'),
buildExample('raycasting'),
buildExample('mouse-flowmap'),
//Shading
buildExample('fog'),
buildExample('textures'),
buildExample('anisotropic'),
buildExample('skydome'),
buildExample('cube-map'),
buildExample('normal-maps'),
buildExample('flat-shading-matcap'),
buildExample('wireframe-shader'),
buildExample('msdf-text'),
buildExample('pbr'),
buildExample('compressed-textures'),
// Frame Buffer
buildExample('render-to-texture'),
buildExample('post-fxaa'),
buildExample('mrt'),
buildExample('shadow-maps'),
buildExample('post-fluid-distortion'),
buildExample('gpgpu-particles'),
// Animation
buildExample('skinning'),
// Performance
buildExample('high-mesh-count', 'src/examples/high-mesh-count/template.html')
]
function buildExample(example, htmlTemplate = 'src/examples/template.html') {
return {
input: `./src/examples/${example}/index.ts`,
output: {
file: `./examples/${example}.js`,
format: 'iife',
// sourcemap: true
name: 'window', extend: true, globals: {}
},
watch: {
chokidar: {
usePolling: true
}
},
plugins: [
template({
template: htmlTemplate,
target: `${example}.html`
}),
resolve({ extensions }),
babel({ extensions, include: ['./src/**/*'] }),
]
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。