We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 26dc9ee + 6605afd commit d1375d6Copy full SHA for d1375d6
editor/index.html
@@ -39,6 +39,7 @@
39
<script src="../examples/js/exporters/ColladaExporter.js"></script>
40
<script src="../examples/js/exporters/GLTFExporter.js"></script>
41
<script src="../examples/js/exporters/OBJExporter.js"></script>
42
+ <script src="../examples/js/exporters/PLYExporter.js"></script>
43
<script src="../examples/js/exporters/STLExporter.js"></script>
44
45
<script src="../examples/js/renderers/Projector.js"></script>
editor/js/Menubar.File.js
@@ -266,6 +266,42 @@ Menubar.File = function ( editor ) {
266
} );
267
options.add( option );
268
269
+ // Export PLY (ASCII)
270
+
271
+ var option = new UI.Row();
272
+ option.setClass( 'option' );
273
+ option.setTextContent( strings.getKey( 'menubar/file/export/ply' ) );
274
+ option.onClick( function () {
275
276
+ var exporter = new THREE.PLYExporter();
277
278
+ exporter.parse( editor.scene, function ( result ) {
279
280
+ saveArrayBuffer( result, 'model.ply' );
281
282
+ } );
283
284
285
+ options.add( option );
286
287
+ // Export PLY (Binary)
288
289
290
291
+ option.setTextContent( strings.getKey( 'menubar/file/export/ply_binary' ) );
292
293
294
295
296
297
298
+ saveArrayBuffer( result, 'model-binary.ply' );
299
300
+ }, { binary: true } );
301
302
303
304
305
// Export STL (ASCII)
306
307
var option = new UI.Row();
editor/js/Strings.js
@@ -20,6 +20,8 @@ var Strings = function ( config ) {
20
'menubar/file/export/glb': 'Export GLB',
21
'menubar/file/export/gltf': 'Export GLTF',
22
'menubar/file/export/obj': 'Export OBJ',
23
+ 'menubar/file/export/ply': 'Export PLY',
24
+ 'menubar/file/export/ply_binary': 'Export PLY (Binary)',
25
'menubar/file/export/stl': 'Export STL',
26
'menubar/file/export/stl_binary': 'Export STL (Binary)',
27
'menubar/file/publish': 'Publish',
@@ -325,6 +327,8 @@ var Strings = function ( config ) {
325
327
'menubar/file/export/glb': '导出GLB',
326
328
'menubar/file/export/gltf': '导出GLTF',
329
'menubar/file/export/obj': '导出OBJ',
330
+ 'menubar/file/export/ply': '导出PLY',
331
+ 'menubar/file/export/ply_binary': '导出PLY(二进制)',
332
'menubar/file/export/stl': '导出STL',
333
'menubar/file/export/stl_binary': '导出STL(二进制)',
334
'menubar/file/publish': '发布',
editor/sw.js
@@ -36,6 +36,7 @@ const assets = [
36
'../examples/js/exporters/ColladaExporter.js',
37
'../examples/js/exporters/GLTFExporter.js',
38
'../examples/js/exporters/OBJExporter.js',
+ '../examples/js/exporters/PLYExporter.js',
'../examples/js/exporters/STLExporter.js',
'../examples/js/renderers/Projector.js',
0 commit comments