diff --git a/.gitignore b/.gitignore index 2d5e01e..a6650a7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ _site .bundle vendor Gemfile.lock +node_modules diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..fd739e8 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*global module,require */ +module.exports = function(grunt) { + "use strict"; + + var pkg = grunt.file.readJSON("package.json"); + + grunt.initConfig({ + pkg: pkg, + + terser: { + options: {}, + dist: { + src: "resources/js/nftLoader/nftLoader.js", + dest: "resources/build/nftLoader/nftLoader.min.js" + } + } + }); + + grunt.loadNpmTasks("grunt-terser"); +}; diff --git a/index.html b/index.html index cb0dea0..b5abf8e 100755 --- a/index.html +++ b/index.html @@ -83,10 +83,14 @@

Jsartoolkit5 NFT experiments

  • Nft simple example
  • Nft example and gltf model (Duck)
  • Nft example and gltf model (CesiumMan)
  • +
    +

    WebApp with the new nftLoader utility

  • Nft example with cubist-dragon.jpg
  • Nft example with pinball.jpg and a video
  • Nft example with pinball.jpg and an image
  • Nft example with pinball.jpg and a cube
  • +
    +

    Other examples and tests...

  • Nft example with pinball.jpg and hiro marker
  • Nft example with pinball.jpg and a gltf model with new filtering
  • Nft example with pinball.jpg and a gltf model with new positioning
  • diff --git a/nft/config.json b/nft/config.json new file mode 100644 index 0000000..e06e809 --- /dev/null +++ b/nft/config.json @@ -0,0 +1,17 @@ +{ + "workerUrl": "../resources/jsartoolkit5/artoolkit/artoolkit_nft.worker.js", + "artoolkitUrl": "../standard/artoolkit.min.js", + "cameraPara": "../../../resources/data/camera_para.dat", + "loading": { + "logo": { + "src": "../resources/data/logo.gif", + "alt": "ar.js logo" + }, + "loadingMessage": "Loading, please wait..." + }, + "renderer": { + "alpha": true, + "antialias": true, + "precision": "mediump" + } +} diff --git a/nft/nftLoader.js b/nft/nftLoader_light.js similarity index 100% rename from nft/nftLoader.js rename to nft/nftLoader_light.js diff --git a/nft/nft_cubist_dragon.html b/nft/nft_cubist_dragon.html index a928077..6f42123 100644 --- a/nft/nft_cubist_dragon.html +++ b/nft/nft_cubist_dragon.html @@ -2,134 +2,41 @@ NFT marker example with Three.js - + - -
    - ar.js logo - Loading, please wait -
    - - -
    - -
    -

    - Main -

    -
    - -
    -

    - Worker -

    -
    - -
    - - -
    - - - -
    - - - - - - + + + + + diff --git a/nft/nft_pinball_cube.html b/nft/nft_pinball_cube.html index 15f565f..852bb2e 100644 --- a/nft/nft_pinball_cube.html +++ b/nft/nft_pinball_cube.html @@ -2,127 +2,28 @@ NFT marker example with Three.js - + -
    - ar.js logo - Loading, please wait -
    + + 🖼 Marker Image + - + + + + + - - - - + diff --git a/nft/nft_pinball_image.html b/nft/nft_pinball_image.html index 0187a74..36fabcf 100644 --- a/nft/nft_pinball_image.html +++ b/nft/nft_pinball_image.html @@ -2,142 +2,37 @@ NFT marker example with Three.js - + - -
    - ar.js logo - Loading, please wait -
    - - - -
    - -
    -

    - Main -

    -
    - -
    -

    - Worker -

    -
    - -
    - - - -
    - - - -
    - + 🖼 Marker Image - - + + diff --git a/nft/nft_pinball_mixed.html b/nft/nft_pinball_mixed.html index 8469618..de9f125 100644 --- a/nft/nft_pinball_mixed.html +++ b/nft/nft_pinball_mixed.html @@ -2,7 +2,7 @@ NFT marker example with Three.js - +
    diff --git a/nft/nft_pinball_video.html b/nft/nft_pinball_video.html index b6fcef9..0fd3a8c 100644 --- a/nft/nft_pinball_video.html +++ b/nft/nft_pinball_video.html @@ -2,135 +2,48 @@ NFT marker example with Three.js - + -
    - ar.js logo - Loading, please wait -
    - - - -
    -
    -

    - Main -

    -
    - -
    -

    - Worker -

    -
    -
    - - -
    - - - -
    - - 🖼 Marker Image - - - - - - - + + 🖼 Marker Image + + + + + + + diff --git a/nft/nft_simple_multi_markers.html b/nft/nft_simple_multi_markers.html index 62b2dfb..4ef080c 100644 --- a/nft/nft_simple_multi_markers.html +++ b/nft/nft_simple_multi_markers.html @@ -2,7 +2,7 @@ NFT marker example with Three.js - +
    diff --git a/nft/nft_threejs_filter_worker_gltf.html b/nft/nft_threejs_filter_worker_gltf.html index 6b2a1d0..84d5a88 100644 --- a/nft/nft_threejs_filter_worker_gltf.html +++ b/nft/nft_threejs_filter_worker_gltf.html @@ -4,7 +4,7 @@ NFT marker example with a WebWorker and Three.js - +
    @@ -52,7 +52,7 @@
    🖼 Marker Image @@ -62,7 +62,7 @@ - + - +