bill 3 tahun lalu
induk
melakukan
809bdaaa1f

File diff ditekan karena terlalu besar
+ 3070 - 0
dist/assets/b3dmExample.fa261be3.js


+ 41 - 0
dist/example/b3dmExample.html

@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+        <meta charset="utf-8"/>
+
+        <title>3D Tiles Renderer Batch Example</title>
+
+        <style>
+            * {
+                margin: 0;
+                padding: 0;
+            }
+
+            html {
+                overflow: hidden;
+                font-family: Arial, Helvetica, sans-serif;
+                user-select: none;
+            }
+
+            canvas {
+                image-rendering: pixelated;
+                outline: none;
+            }
+
+			#info {
+				color: white;
+				font-family: monospace;
+				position: absolute;
+				white-space: pre;
+				line-height: 1.5em;
+				padding: 10px;;
+			}
+        </style>
+      <script type="module" crossorigin src="/assets/b3dmExample.fa261be3.js"></script>
+    </head>
+    <body>
+		<div id="info"></div>
+        
+    </body>
+</html>

+ 1 - 1
example/b3dmExample.html

@@ -35,6 +35,6 @@
     </head>
     <body>
 		<div id="info"></div>
-        <script src="./b3dmExample.js"></script>
+        <script src="./b3dmExample.js" type="module"></script>
     </body>
 </html>

+ 1 - 0
example/b3dmExample.js

@@ -26,6 +26,7 @@ let infoEl;
 
 init();
 animate();
+console.log( 'a?' );
 
 // Adjusts the three.js standard shader to include batchid highlight
 function batchIdHighlightShaderMixin( shader ) {

+ 1 - 1
example/cmptExample.html

@@ -25,6 +25,6 @@
         </style>
     </head>
     <body>
-        <script src="./cmptExample.js"></script>
+        <script src="./cmptExample.js" type="module"></script>
     </body>
 </html>

+ 1 - 1
example/customMaterial.html

@@ -25,6 +25,6 @@
         </style>
     </head>
     <body>
-        <script src="./customMaterial.js"></script>
+        <script src="./customMaterial.js" type="module"></script>
     </body>
 </html>

+ 1 - 1
example/gltf.html

@@ -25,6 +25,6 @@
         </style>
     </head>
     <body>
-        <script src="./gltf.js"></script>
+        <script src="./gltf.js" type="module"></script>
     </body>
 </html>

+ 1 - 1
example/i3dmExample.html

@@ -25,6 +25,6 @@
         </style>
     </head>
     <body>
-        <script src="./i3dmExample.js"></script>
+        <script src="./i3dmExample.js" type="module"></script>
     </body>
 </html>

+ 1 - 1
example/index.html

@@ -25,6 +25,6 @@
         </style>
     </head>
     <body>
-        <script src="./index.js"></script>
+        <script src="./index.js" type="module"></script>
     </body>
 </html>

+ 1 - 1
example/ionExample.html

@@ -48,6 +48,6 @@
 				<br/>
 			</div>
 		</div>
-        <script src="./ionExample.js"></script>
+        <script src="./ionExample.js" type="module"></script>
     </body>
 </html>

+ 1 - 1
example/mars.html

@@ -49,6 +49,6 @@
 			<br/>
 			See more information <a href="https://github.com/NASA-AMMOS/3DTilesSampleData/tree/master/msl-dingo-gap">here</a>.
 		</div>
-        <script src="./mars.js"></script>
+        <script src="./mars.js" type="module"></script>
     </body>
 </html>

+ 1 - 1
example/offscreenShadows.html

@@ -25,6 +25,6 @@
         </style>
     </head>
     <body>
-        <script src="./offscreenShadows.js"></script>
+        <script src="./offscreenShadows.js" type="module"></script>
     </body>
 </html>

+ 1 - 1
example/pntsExample.html

@@ -25,6 +25,6 @@
         </style>
     </head>
     <body>
-        <script src="./pntsExample.js"></script>
+        <script src="./pntsExample.js" type="module"></script>
     </body>
 </html>

+ 1 - 1
example/vr.html

@@ -24,6 +24,6 @@
         </style>
     </head>
     <body>
-        <script src="./vr.js"></script>
+        <script src="./vr.js" type="module"></script>
     </body>
 </html>

File diff ditekan karena terlalu besar
+ 0 - 31232
package-lock.json


+ 5 - 0
package.json

@@ -22,6 +22,8 @@
     "src/*"
   ],
   "scripts": {
+    "dev": "vite",
+    "build": "vite build",
     "start": "concurrently \"parcel watch example/*.html --out-dir ./example/dev-bundle/ --public-url . --no-cache\" \"static-server\"",
     "build-examples": "parcel build --no-content-hash example/*.html --out-dir ./example/bundle/ --public-url . --no-cache",
     "lint": "eslint \"src/**/*.js\" \"test/**/*.js\" \"example/*.js\" && tsc -p tsconfig.json --noEmit",
@@ -55,5 +57,8 @@
   },
   "peerDependencies": {
     "three": ">=0.123.0"
+  },
+  "dependencies": {
+    "vite": "^3.0.9"
   }
 }

File diff ditekan karena terlalu besar
+ 8358 - 0
pnpm-lock.yaml


+ 21 - 0
tsconfig.node.json

@@ -0,0 +1,21 @@
+{
+  "compilerOptions": {
+    "target": "ESNext",
+    "useDefineForClassFields": true,
+    "strict": true,
+    "jsx": "preserve",
+    "sourceMap": true,
+    "allowJs": true,
+    "resolveJsonModule": true,
+    "isolatedModules": true,
+    "esModuleInterop": true,
+    "lib": ["ESNext", "DOM"],
+    "skipLibCheck": true,
+    "outDir": "./dist",
+    "composite": true,
+    "module": "ESNext",
+    "moduleResolution": "Node",
+    "allowSyntheticDefaultImports": true
+  },
+  "include": ["vite.config.ts"]
+}

+ 22 - 0
vite.config.ts

@@ -0,0 +1,22 @@
+import { defineConfig } from 'vite';
+import { resolve } from 'path';
+
+
+export default defineConfig( {
+	build: {
+		rollupOptions: {
+			input: {
+				b3dmExample: resolve( __dirname, 'example/b3dmExample.html' ),
+				cmptExample: resolve( __dirname, 'example/cmptExample.html' ),
+				customMaterial: resolve( __dirname, 'example/customMaterial.html' ),
+				gltf: resolve( __dirname, 'example/gltf.html' ),
+				index: resolve( __dirname, 'example/index.html' ),
+				ionExample: resolve( __dirname, 'example/ionExample.html' ),
+				mars: resolve( __dirname, 'example/mars.html' ),
+				offscreenShadows: resolve( __dirname, 'example/offscreenShadows.html' ),
+				pntsExample: resolve( __dirname, 'example/pntsExample.html' ),
+				vr: resolve( __dirname, 'example/vr.html' ),
+			},
+		},
+	},
+} );