Plugin Directory

Changeset 1608893

Timestamp:
03/06/2017 06:11:07 PM (7 years ago)
Author:
goldsounds
Message:

Fix bug initializing new scene

Location:
gltf-media-type/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • gltf-media-type/trunk/admin/js/gltf-admin-select-model-metabox.js

    r1608393 r1608893  
    11jQuery(function($){
    2 
    3     // debugger;
    42
    53  // Set all variables to be used in scope
     
    2725            title: 'Select a GLTF model file',
    2826            button: {
    29             text: 'Use this model'
     27            text: 'Use this model'
    3028            },
    3129            multiple: false,  // Set to true to allow multiple files to be selected
    32             library : { type: 'model/gltf+json' }
     30            library }
    3331        });
    3432
  • gltf-media-type/trunk/includes/class-gltf.php

    r1608393 r1608893  
    138138        add_filter( 'wp_mime_type_icon', array( $this, 'mime_types_icons' ), 10, 3 );
    139139        add_shortcode( 'gltf_model', array( $this, 'model_shortcode' ) );
    140         // add three.js if the current post has our shortcode
    141140        add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_model_render_script' ) );
    142141        add_action( 'init', array( $this, 'register_scene_post_type' ) );
     
    202201    function add_scene_metaboxes() {
    203202        add_meta_box( 'gltf_select_scene_model', __( 'Select Scene Model', 'gltf-media-type' ), array( $this, 'select_scene_model_callback' ), 'gltf_scene' );
    204         // add_meta_box( 'scene_select_model', 'Select Model', 'swp_file_upload', 'podcasts', 'normal', 'default' );
    205203    }
    206204
     
    270268            update_post_meta( $post_id, '_gltf_main_model_scale', $_POST[ 'main-model-scale' ] );
    271269        }
    272         if( isset( $_POST[ 'meta-radio' ] ) ) {
    273             update_post_meta( $post_id, 'meta-radio', $_POST[ 'meta-radio' ] );
    274         }
    275270    }
    276271
  • gltf-media-type/trunk/js/public.js

    r1608393 r1608893  
    4894348943}
    4894448944
     48945
     48946
     48947
    4894548948jQuery( function() {
    4894648949    jQuery( '.gltf-model' ).each( initializeGltfElement );
  • gltf-media-type/trunk/jssrc/public.js

    r1608393 r1608893  
    155155}
    156156
     157
     158
     159
    157160jQuery( function() {
    158161    jQuery( '.gltf-model' ).each( initializeGltfElement );
Note: See TracChangeset for help on using the changeset viewer.