Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize the loading of three.js #1140

Merged
merged 1 commit into from
Oct 1, 2019
Merged

Optimize the loading of three.js #1140

merged 1 commit into from
Oct 1, 2019

Conversation

stevenjoezhang
Copy link
Contributor

No description provided.

@1v9
Copy link
Member

1v9 commented Aug 30, 2019

const styles = ['{{ waves_uri }}', '{{ lines_uri }}', '{{ sphere_uri }}'];
const loadStyles = () => {
  styles.forEach(item => {
    if (item !== '') {
      let script = document.createElement('script');
      script.src = item;
      document.body.appendChild(script);
    }
  });
};
NexT.utils.getScript('{{ three_uri }}', loadStyles, window.THREE);

@1v9
Copy link
Member

1v9 commented Oct 1, 2019

previous story here #935

@1v9 1v9 merged commit cb5123e into master Oct 1, 2019
@delete-merged-branch delete-merged-branch bot deleted the three branch October 1, 2019 06:47
1v9 added a commit to theme-next/theme-next.org that referenced this pull request Oct 1, 2019
@1v9 1v9 modified the milestones: v7.5.0, 7.4.2 Oct 20, 2019
Liam0205 added a commit to Liam0205/hexo-theme-next that referenced this pull request Oct 22, 2019
- Add Google Analytics Pageview (theme-next#1198)

- Make font-size customized only when `theme.font.enable` is true (theme-next#1058)
- Point to different website based on the scheme (theme-next#1202)
- New Valine options (theme-next#1193)
- Improve the style of site-nav (theme-next#1180)

- Code style update (theme-next#1197, theme-next#1205)
- Replace id with class name (theme-next#1209)
- Add lang attribute to article tag when specified in front matter (theme-next#1199)
- Fix compatibility issues with hexo-util@1.3.0 (theme-next#1175)
- Optimize the loading of three.js (theme-next#1140)

- New README for NexT (theme-next#1155)

***

For full changes, see the [comparison between v7.4.1 and v7.5.0](theme-next/hexo-theme-next@v7.4.1...v7.5.0)
tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants